This invention relates in one aspect to an apparatus and a method for the sorting of articles in which the sorting is carried out in dependence on the presence of a surface feature of the article having a value of reflectivity substantially different from a reference value. This aspect of the invention has particular but not exclusive application to the inspection of root vegetables during processing, for example newly-peeled potatoes.
A further aspect of the invention relates to a method and apparatus for processing image data to determine the presence of bounded regions therein. The image processing method is particularly suitable for use in the foregoing sorting metod and may also be useful for detecting flaws in sheet material such as laminated plastics, or, for example in paintwork.
It is particularly important that sub-standard potatoes, particularly those displaying large black spots, should be excluded from further processing operations such as chipping or canning subsequent to peeling. The inspection procedure now commonly employed relies on operators picking out defective potatoes by hand as they pass along an inspection table. Such a procedure is difficult and inefficient however since potatoes newly peeled by a steam process are hot and slippery. In copending patent application No. 7938336 the present Applicant has proposed a semi-automatic inspection procedure in which in one form the inspection area of a conveyor is viewed by means of a television camera and an operator indicates the coordinates of a defective potato in a T.V. monitor picture by touching the screen with a light pen. The contact position is sensed and the information is used to determine the time of arrival of the defective potato at the end of the conveyor. It can then be arranged that a selection device will operate to divert the path of the defective potato from the main stream when it reaches the end of the conveyor. Such selection devices for example in the form of an array of pneumatically deflectable fingers each independently controlling a small part of the width of the conveyor are well known.
It is an object of the present invention at least in preferred embodiments thereof to avoid the need for a supervisory operator and to provide completely automatic means for processing an image signal to determine the position of a defect or desired feature and to convey an appropriate instruction to the selection device.
In accordance with the first aspect of the invention there is provided apparatus for detecting the presence in an article or articles having predominantly a first value of reflectivity of regions having a second value of reflectivity substantially different from that of the first value, which apparatus comprises means for scanning the article or articles to produce an image signal, and means for processing the image signal, to produce an output when the image signal indicates a surface feature in the scanned region having the said second value of reflectivity, whenever such feature lies wholly within an area having the first value of reflectivity.
It should be appreciated that the reflectivities of areas having "first" or "second" reflectivity values need not be uniform over the whole of the said areas, and allocation of a picture point to "first" or "second" reflectivity values may be carried out simply according to whether the reflectivity is greater or less than an arbitrary value. However it is greatly preferred that the distinction between "first" and "second" reflectively values should be made by labelling picture points of the image as corresponding to a boundary between the said first and second regions when local difference values between neighbouring picture points is greater than a specified threshold, and labelling as points of the "second" reflectivity value only those surrounded on all sides by such a boundary.
This aspect of the invention is thus particularly suitable for use where boundaries between regions are reasonably sharply defined.
In accordance with a preferred embodiment of this first aspect of the invention there is provided article sorting apparatus comprising conveying means for conveying through an inspection region articles having predominantly a first value of surface reflectivity but bearing occasional surface features having a second value of reflectivity which is substantially different from the first value, means for illuminating each article in the inspection region, sensing means responsive to reflected radiation reflected from the articles for scanning the inspection region to derive an image signal, means for processing the image signal to detect the presence of and to indicate the location of a surface feature having the second value of reflectivity whenever such feature lies, as viewed by the sensing means, wholly within an area having the first value of reflectivity, and deflection means responsive to such detection and indication of location to cause the article bearing such feature to be routed differently from the other articles.
In accordance with a second aspect of this invention, there is provided apparatus for detecting a bounded region of an image, which apparatus comprises means for scanning the image to produce a signal indicative of intensity at a plurality of picture points, means for deriving difference values between neighbouring points in a plurality of directions to determine the presence of region boundaries, and means for labelling a picture point as lying within a bounded region according to whether or not it is surrounded, for example surrounded on four sides, by such region boundaries. The apparatus preferably includes means for labelling additional picture points, for example labelling them as being region boundaries, according to whether or not they lie within a predetermined number of picture points in a specified direction of a region boundary, and means for thereby determining which of the said picture points lie within a predetermined number of picture points of boundaries in each of the said plurality of directions, and therefore correspond to picture points lying within a bounded region.
In a preferred embodiment, the image processing apparatus comprises apparatus for detecting a bounded region of an image, which apparatus comprises means for scanning the image via a raster scan to produce a signal indicative of image intensity at a plurality of picture points, means for comparing the image intensity at each of the said picture points with that of a neighbouring point in each of at least two directions to derive therefrom a difference value, means for labelling the picture points as corresponding to region boundaries whenever the difference values exceed a predetermined threshold value, means for expanding the region boundaries by labelling further picture points as region boundaries such that boundaries between neighbouring picture elements along a scan line are expanded to successive neighbouring picture elements along the said scan line and boundaries between neighbouring picture elements or neighbouring scan lines are expanded to neighbouring successive scan lines, and means for delaying signals associated with different types of region boundaries by different amounts to superimpose those signals corresponding to picture points labelled as being included within a plurality of expanded boundaries.
The means for processing the image signal may include storage means for storing digitally the value of the signal for each of an array of points and means for deriving difference values between neighbouring points in a plurality of directions to determine the presence of a closed boundary between an outer area corresponding to the first value of reflectivity and an inner area corresponding to the second value of reflectivity.
The term "neighbouring points" as used herein is intended to include not only adjacent points in any particular direction but also points spaced from the point of interest by, for example one or two picture points in the direction of interest. Difference values derived from every alternate point have been found to produce effective boundary determinations.
The means for processing the image signal may further include means for reallocating difference values representing the closed boundary to points within the boundary to produce by superimposition a localised area of enhanced value and means for determining the location of the area of enhanced value.
The means for processing the image signal may further include means for reallocating difference values representing a boundary which encloses an area corresponding to the first value of reflectivity to points outside that boundary such that the boundary is represented by points of reduced value.
The means for processing the image signal may further include means for deleting from the storage means all difference values below a predetermined threshold value such that the area of enhanced value is substantially isolated.
The processing means conveniently is formed by electronic circuitry, which may be specialised circuitry costructed for the purpose, or may consist of a micro-processor or other general purpose computer programmed to carry out the various functions set out in the preceding paragraphs, and in the remainder of the specification. In this connection it is to be appreciated that where, for example, the processing means comprises a microprocessor, it is usual that many parts of the microprocessor will be utilised at various times in operation to carry out more than one function required in accordance with the invention. Thus it is not necessarily the case that any particular function required in accordance with the invention is allocated to any particular operating means within a computer, but rather that there should merely be provided appropriate means for carrying out the function, and at other times that means may carry out other functions.
It will be apparent that when a desired feature has been located within the scanning area, and thence within the inspection region, the article bearing such feature may be tracked along the conveying means by deriving a speed dependent signal (e.g. from the conveying means drive mechanism) so that the deflection means may be operated at the appropriate instant.
The scanning pattern may consist of a conventional television type of raster, and may be directed along the direction of movement so that the position of the article in the width of the conveyor may be derived from the frame timing of the pattern. In the direction of movement the position of the article may be identified by reference to the interception of the line scan by regularly occurring structural features on the conveying means. Alternatively the raster scan may be perpendicular to the direction of movement, in which case these are reversed.
The sensing means may be a television camera which may be operated under continuous lighting if the conveying means proceeds in a stepwise or batch inspection manner. If the conveying means provides continuous movement strobe illumination synchronised with the frame frequency may be advantageous in certain circumstances, the imaging signal being extracted only in one frame in each sequence of three or four frames.
Where the articles are rounded articles such as potatoes, the conveying means preferably comprises a roller table over which the articles are conveyed in the inspection area. A roller table is a conveyor formed of a plurality of rotatable elongate members, known as rollers, connected together by, for example, side chains to form an endless array in which the rollers are spaced apart with their axes parallel and transverse to the direction of translational movement. Articles are conveyed in transversely extending rows supported by adjacent pairs of rollers. The rollers are rotated over at least part of the endless conveyor path in order to rotate the articles conveyed thereon to evenly distribute the articles on the conveyor and to sequentially present the whole surface of the articles for inspection. The rollers and the spaces between them may be such as to be sensed by the sensing means as having a reflectivity close to the second value.
In the inspection of peeled potatoes the feature to be searched for is a blackened area on the otherwise white surface for which purpose the rollers and background are preferably also black. The rollers may be marked to provide a video reference to their position and therefore to the probable position of potatoes between the rollers whereby signals purporting to relate to the presence of a potato in a different position may be rejected. Preferably however, a video reference signal for controlling the timing of the operation of the deflection means is produced by the mechanism moving the roller bed.
Preferably the speed of the conveying means for potatoes is so controlled with respect to the rate of loading that the rollers are sufficiently occupied to prevent a potato which has been identified as defective from moving across the width of the roller away from its determined location. Such movement would cause the selection mechanism to be operated incorrectly.
The deflection means may comprise a bank of fingers arranged to occupy the whole width of the conveying means and at a level such that articles leaving the conveyor must pass or be deflected by one or more of the fingers. Appropriate fingers are operable independently or in groups in response to signals from the image signal processing means and from the conveying means to select for direction in a predetermined path an article previously identified in the inspection region.
It is particularly preferred that an output of the processing means is arranged to actuate the deflector means in dependence upon first and second co-ordinate signals representative of first and second orthogonal co-ordinates of a location in the scanned area, the orthogonal co-ordinates being arranged with the first co-ordinate in a direction corresponding to a direction across the path of travel of the conveyor means at the inspection area and with the second co-ordinate in a direction corresponding to a direction aligned along the path of travel of the conveyor means at the inspection area. It is further preferred that the deflector means comprises an array of deflector devices arranged across the path of the conveyor means downstream of the inspection area, and drive means for driving selected deflector devices, the selection of deflector devices actuated being controlled in dependence upon the said first co-ordinate signals and the timing of operation of the deflector devices being controlled in dependence upon the said second co-ordinate signals.
The deflector means may comprise fingers for deflecting articles falling from the conveyor means, the fingers being actuable between two or more positions so as to direct the falling articles onto different conveyor belts or other receptacles. In the case of potatoes or other root vegetables or bulbs, the said fingers can be of a kind well known in themselves for separating produce from soils and stones using, for example, x-ray beams to distinguish the difference. Usually the deflector means will be located downstream of the inspection area, and in such cases the signals controlling actuation of the deflector means will be processed in control means in order to compensate for the time delay for the articles to pass from the indicated transient positions in the inspection area to the deflector means.
However it is to be appreciated that the deflector means may constitute means for deflecting selected, or unselected articles at substantially the same time that the articles are selected. In such case of course no time delay needs to be introduced which is related to the speed of conveying. One method of achieving such deflection is for example to provide beneath the conveyor means a bank of ejector rods which can be triggered to project upwardly through apertures in the conveyor means to strike, for example, unwanted articles and to propel such articles clear of the conveyor means. Such arrangements have previously been used in connection with sorting of potatoes from stones, where unwanted stones have been ejected in this manner. It is to be understood that the term deflector means includes not only means for deflecting articles through differing angles during travel of the articles, but also includes means for removing articles entirely from a conveying path, and indeed includes any means for effecting sorting of objects in response to the signals generated by the processing means.
In accordance with another aspect of the invention there is provided a method of sorting articles by selecting from a plurality of articles having a first value of surface reflectivity articles bearing a surface feature having a second value of reflectivity which is substantially different from the first value, the method comprising the operations of conveying such articles through an inspection region, illuminating each article in the inspection region, scanning the inspection region by sensing means responsive to reflected radiation reflected from the articles to derive an image signal, processing the image signal to detect the presence of and to indicate the location of a surface feature having the second value of reflectivity whenever such feature lies, as viewed by the sensing means, wholly within an area having the first value of reflectivity, and operating deflection means responsive to such detection and indication of location to cause the article bearing such feature to be deflected from the other articles.
In accordance with a further aspect of the invention, there is provided a method of detecting a bounded region of an image, which method comprises scanning the image to produce a signal indicative of intensity at a plurality of picture points, deriving difference values between neighbouring points in a plurality of directions to determine the presence of region boundaries, and labelling a picture point as lying within a bounded region according to whether or not it is surrounded on four sides by such region boundaries.
Preferably, additional picture points are labelled as corresponding to region boundaries according to whether or not they lie within a predetermined number of picture points in a specified direction of a region boundary, and thereby it is determined which of the said picture points lie within a predetermined number of picture points from boundaries in each of the said plurality of directions, and therefore correspond to picture points lying within a bounded region.
In accordance with yet a further aspect of the invention, there is provided a method of detecting a bounded region of an image, which method comprises scanning the image via a raster scan to produce a signal indicative of image intensity at a plurality of picture points, comparing the image intensity at each of the said picture points with that of a neighbouring point in each of at least two directions to derive therefrom a difference value, labelling the picture points as corresponding to region boundaries whenever the difference values exceed a predetermined threshold value, expanding the region boundaries by labelling further picture points such that boundaries between neighbouring picture elements along a scan line are expanded to successive neighbouring picture elements along the said scan line and boundaries between neighbouring picture elements on neighbouring scan lines are expanded to neighbouring successive scan lines, delaying signals associated with different types of region boundaries by different amounts to superimpose those signals corresponding to picture points labelled as being included within a plurality of expanded boundaries.